-- GENERATED SPELL FOR [Bloodscalp Warrior] --


function spell0_587(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_587', 5275, 1)
end

function spell1_587(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_587', 662, 1)
end

function spell2_587(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_587', 8342, 1)
end

function Sorts_587(pUnit, Event)
local choix_sorts_587 = math.random(0, 2)
if choix_sorts_587 == 0 then
pUnit:RegisterEvent('spell0_587', 1, 1)
end
if choix_sorts_587 == 1 then
pUnit:RegisterEvent('spell1_587', 1, 1)
end
if choix_sorts_587 == 2 then
pUnit:RegisterEvent('spell2_587', 1, 1)
end
end

function mob587_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_587', math.random(1500, 3000), 1)
end

function mob587_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob587_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob587_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(587, 1, 'mob587_Action')
RegisterUnitEvent(587, 2, 'mob587_Leave')
RegisterUnitEvent(587, 3, 'mob587_Kill')
RegisterUnitEvent(587, 4, 'mob587_Die')
